package com.hzit.loan.pay.iClient;

import com.hzit.loan.pay.commonApi.resp.PayNotifyData;
import com.hzit.loan.pay.commonApi.resp.PayResultData;
import com.hzit.loan.pay.commonApi.resp.RespVo;
import com.hzit.loan.pay.commonApi.resp.TradeCloseRespData;
import com.hzit.loan.pay.iClient.impl.AlipayFrontClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "ALIPAY-FRONT",fallback = AlipayFrontClientImpl.class)
public interface IAlipayFrontClient {

    /**
     * 二维码支付接口
     * @param subject
     * @param paySeiralNo
     * @param mchOrderAmt
     * @return
     */
    @RequestMapping("/alipayFront/qrCodePay")
    public RespVo<PayResultData> qrCodePay(@RequestParam("subject")String subject,
                                           @RequestParam("paySeiralNo")String paySeiralNo,
                                           @RequestParam("mchOrderAmt")String mchOrderAmt);

    /**
     * 支付查询接口
     * @param paySeiralNo
     * @return
     */
    @RequestMapping("/alipayFront/query")
    public RespVo<PayNotifyData> payQuery(@RequestParam("paySeiralNo")String paySeiralNo);

    /**
     * 交易关闭
     * @param paySeiralNo
     * @return
     */
    @RequestMapping("/alipayFront/tradeClose")
    public RespVo<TradeCloseRespData> tradeClose(@RequestParam("paySeiralNo")String paySeiralNo);
}
